//
//  User.h
//  iengage
//
//  Created by Luis Ziliani on 2/9/09.
//  Copyright 2009 Manas. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

#define	UserDistanceNotCalculated	-1.0

@interface User : NSObject {
	NSString *login;
	NSString *displayName;
	NSString *lastMessage;
	NSString *imageData;
	double latitude;
	double longitude;
	double lastDirectionAngle;
	NSDate *lastMessageDate;
	
	CLLocationDistance lastDistance;
}

@property (retain) NSString* login;
@property (retain) NSString* displayName;
@property (retain) NSString* lastMessage;
@property (retain) NSString* imageData;
@property (retain) NSDate* lastMessageDate;

@property (assign) double latitude;
@property (assign) double longitude;
@property (assign) double lastDirectionAngle;
@property (assign) CLLocationDistance lastDistance;

- (CLLocation*) getLocation;

- (NSString*) lastMessageDateDifferenceFromNow;

- (void) calculateDistanceFrom: (CLLocation *)location;

@end
